package dataprocessing;

public class Rec implements Comparable<Rec>{
	
	int artist1Id;
	int artist2Id;
	
	public Rec(int a,int b){
		artist1Id = a;
		artist2Id = b;
	}

	@Override
	public int compareTo(Rec o) {
		if(artist1Id == o.artist1Id && artist2Id == o.artist2Id)
			return 0;
		if(artist1Id < o.artist1Id)
			return -1;
		if(artist1Id > o.artist1Id)
			return 1;
		if(artist1Id == o.artist1Id && artist2Id < o.artist2Id)
			return -1;
		if(artist1Id == o.artist1Id && artist2Id > o.artist2Id)
			return 1;
		return 0;
	}

	public String toString(){
		return artist1Id +" "+ artist2Id;
	}
}
